import {BizConfigUtils} from "../common/biz-config-utils.ts";
import {createStore} from "vuex";

export default createStore({
  state: {
    loginUser: BizConfigUtils.getLoginUser()
  },
  getters: {
    getLoginUser: (state: any) => {
      return state.loginUser
    }
  },
  mutations: {
    updateLoginUser: (state: any, loginUser: any) => {
      BizConfigUtils.setLoginUser(loginUser)
      state.loginUser = loginUser
    }
  },
  actions: {
  },
  modules: {
  }
})
